<?php
/**
 * @category   Application_Extensions
 * @package    Talktangle Plugin 
 * @copyright  Idragon Co., Ltd.
 * @license
 */
class Talktangle_Widget_SearchpromotiontangleController extends Engine_Content_Widget_Abstract {
		
	public function indexAction() {
	    $request = Zend_Controller_Front::getInstance()->getRequest();
        $this->view->search = $search = $request->getParam('search','');
        $promotionT = Engine_Api::_()->getDbtable('promotions','talktangle');
        $select = $promotionT->select()
                             ->where('title like ?','%'.$search.'%');
        $this->view->paginator = $paginator = Zend_Paginator::factory($select);

        // Set item count per page and current page number
        $paginator->setItemCountPerPage($this->_getParam('itemCountPerPage', 4));
        $paginator->setCurrentPageNumber($this->_getParam('page', 1));
        $this->view->paginator = $paginator;
     
       
	}
}